import {
    createBrowserRouter,
} from "react-router-dom";

import { lazy } from "react";
let Login = lazy(() => import("../views/Login/Login"))
let Register = lazy(() => import("../views/Register/Register"))
let Home = lazy(() => import("../views/Home/Home"))
let Details = lazy(() => import("../views/Details/Details"))
let Messages = lazy(() => import("../views/Messages/Messages"))
let Lists = lazy(() => import("../views/List/Lists"))
let Shop = lazy(() => import("../views/Shop/Shop"))
let Orderdetails = lazy(() => import("../views/Orderdetails/Orderdetails"))
let Ticketing = lazy(() => import("../views/Ticketing/Ticketing"))

const router = createBrowserRouter([
    {
        path: "/",
        element: <Login />,
    },
    {
        path: "/register",
        element: <Register />,
    },
    {
        path: "/home",
        element: <Home />,
    },
    {
        path: "/details/:id",
        element: <Details />,
    },
    {
        path: "/messages",
        element: <Messages />,
    },
    {
        path: "/lists",
        element: <Lists />,
    },
    {
        path: "/shop",
        element: <Shop />,
    },
    {
        path: "/orderdetails",
        element: <Orderdetails />,
    },
    {
        path: "/ticketing",
        element: <Ticketing />,
    },
]);

export default router;